-
Notifications
You must be signed in to change notification settings - Fork 8k
drivers: mspi: Support MSPI driver for STM32. #96670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
drivers: mspi: Support MSPI driver for STM32. #96670
Conversation
834dc73
to
7e8241c
Compare
ed327ea
to
a09a921
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename to dts/bindings/mspi/st,stm32-xspi-controller.yaml
MSPI is the subsytem api and XSPI is the ST IP name.
Apply everywhere (driver files, ....) on this PR..
drivers/mspi/mspi_stm32.c
Outdated
|
||
} | ||
|
||
static int flash_stm32_xspi_dma_init(DMA_HandleTypeDef *hdma, struct stream *dma_stream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/flash_stm32_xspi_dma_init/mspi_stm32_xspi_dma_init
For example | ||
dma-names = "tx_rx"; | ||
|
||
ssht-enable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the three IPs, these bindings will have to propose the same configuration options as the union of dts/bindings/memory-controllers/st,stm32-xspi-psram.yaml
and dts/bindings/flash_controller/st,stm32-xspi-nor.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this may potentially be done as a follow up PR
e0849ca
to
806f0f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces MSPI (Multi-SPI) driver support for STM32 microcontrollers, enabling support for XSPI, OSPI, and QSPI peripherals. The implementation provides a unified MSPI interface with different STM32 SPI variants while maintaining compatibility with the existing Zephyr MSPI API.
- Adds three new STM32 MSPI drivers: mspi_stm32_xspi, mspi_stm32_ospi, and mspi_stm32_qspi
- Implements comprehensive MSPI functionality including indirect mode, memory-mapped mode, XIP configuration, and DMA support
- Provides device tree bindings and sample configurations for multiple STM32 boards
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 11 comments.
Show a summary per file
File | Description |
---|---|
drivers/mspi/mspi_stm32_xspi.c | XSPI controller driver implementation with full MSPI functionality |
drivers/mspi/mspi_stm32_ospi.c | OSPI controller driver implementation supporting octal SPI operations |
drivers/mspi/mspi_stm32_qspi.c | QSPI controller driver implementation for quad SPI operations |
drivers/mspi/mspi_stm32.h | Common header file with shared definitions and structures |
dts/bindings/mspi/*.yaml | Device tree binding files for XSPI, OSPI, and QSPI controllers |
drivers/mspi/Kconfig.stm32 | Configuration options for STM32 MSPI drivers |
samples/drivers/mspi/mspi_flash/boards/*.overlay | Board-specific overlay files for sample applications |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
/* | ||
* ************************************************************************** | ||
* MSPI flash controller driver for stm32 serie with multi-SPI periherals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'periherals' to 'peripherals' and 'serie' to 'series'.
* MSPI flash controller driver for stm32 serie with multi-SPI periherals | |
* MSPI flash controller driver for stm32 series with multi-SPI peripherals |
Copilot uses AI. Check for mistakes.
This commit adds the main DTS configurations required to enable MSPI/OSPI/QSPI support on STM32. Signed-off-by: Sara Touqan <[email protected]> Signed-off-by: Sarah Younis <[email protected]> Signed-off-by: Mohammad Odeh <[email protected]>
88b499e
to
88f79c5
Compare
This commit introduces support for the mspi and ospi drivers on STM32, enabling functionality APIs for MSPI/OSPI/QSPI host controllers.. Signed-off-by: Sara Touqan <[email protected]> Signed-off-by: Sarah Younis <[email protected]> Signed-off-by: Mohammad Odeh <[email protected]>
this commit enables building and running the sample on stm32h573i_dk board,stm32h735g_disco board, arduino_giga_r1 board, and b_u585i_iot02a board by providing the required overlay and configuration updates. Signed-off-by: Sara Touqan <[email protected]> Signed-off-by: Sarah Younis <[email protected]> Signed-off-by: Mohammad Odeh <[email protected]>
|
This PR introduces support for MSPI driver on STM32, enabling functionality APIs for MSPI host controllers.
mspi_stm32 driver
support xspi
tested using stm32h573i_dk board
functionalities:
ospi_stm32 driver
mspi_stm32_qspi driver